﻿@using QH.JobBack.Model;
@{
    var module = Model as Module;
    var parentModule = ViewBag.moduleList as List<Module>;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>添加管理员 - 统一权限管理平台</title>
    <link rel="stylesheet" href="~/static/common/layui/css/layui.css">
    <link rel="stylesheet" href="~/static/admin/css/style.css">
    <script src="~/static/common/layui/layui.js"></script>
    <script src="~/static/common/jquery-3.3.1.min.js"></script>
    <script src="~/static/common/vue.min.js"></script>
    <script src="~/static/module/update.js"></script>
</head>
<body>
    <div id="app">
        
            <!--右侧-->
            <div class="">
                <fieldset class="layui-elem-field layui-field-title">
                    <legend>修改组</legend>
                </fieldset>
                <form class="layui-form " action="" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">上级组</label>
                        <div class="layui-input-inline">
                            <select id="ParentId" name="ParentId" lay-verify="required" lay-filter="ParentModule">
                                @foreach (var item in parentModule)
                                {
                                    if (item.Id == module.ParentId)
                                    {
                                        <option value="@item.Id" selected>@item.Name</option>
                                    }
                                    else
                                    {
                                        <option value="@item.Id">@item.Name</option>
                                    }

                                }
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">模块名称</label>
                        <div class="layui-input-block">
                            <input type="text" value="@module.Name" name="Name" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">排序</label>
                        <div class="layui-input-block">
                            <input type="text" value="@module.SortId" name="SortId" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">备注</label>
                        <div class="layui-input-block">
                            <input type="text" value="@module.Remark" name="Remark" required lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">是否启用</label>
                        <div class="layui-input-block">
                            <input type="checkbox" value="1" id="IsEnable" name="IsEnable" lay-text="开启|关闭" checked="" lay-skin="switch" lay-filter="switchEnable">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="submit">立即提交</button>
                        </div>
                    </div>
                    <input type="hidden" value="@module.Id" name="Id" />
                </form>
            </div>
        </div>
    </div>
    <script src="~/static/admin/js/script.js"></script>
</body>
</html>
